from django.contrib import admin
from django.urls import path
from rest_framework.routers import SimpleRouter
from . import views
from .views import TeamViewSet

router = SimpleRouter()


# http://127.0.0.1:8000/api/v1/user/userinfo/login/
router.register('userinfo',views.LoginView, 'userinfo')

# http://127.0.0.1:8000/api/v1/user/mobile/get_mobile/
router.register('mobile', views.RegisterView, 'mobile')

# http://127.0.0.1:8000/api/v1/user/register/register/
router.register('register', views.RegisterView, 'register')

# 忘记密码相关接口
# http://127.0.0.1:8000/api/v1/user/password/send_sms/
# http://127.0.0.1:8000/api/v1/user/password/chance_pwd/
router.register('password', views.SendView, 'password')

# http://127.0.0.1:8000/api/v1/user/code/check_code/
router.register('code', views.SendView, 'code')


# http://127.0.0.1:8000/api/v1/user/mobile/check_mobile/
router.register('mobile', views.SendView, 'mobile')

# http://127.0.0.1:8000/api/v1/user/imitate_code/code_cache/
router.register('imitate_code', views.SendView, 'imitate_code')

# http://127.0.0.1:8000/api/v1/user/teams/
router.register(r'teams', TeamViewSet,basename="teams")





urlpatterns = [
    # path('redis_test/', MyRedisView.as_view()),
    # path('celery_test/', CeleryView.as_view()),
    # path('sckill/', SckillView.as_view()),

]

urlpatterns += router.urls
